﻿using System;

namespace ForgeCraft
{
    public class CmdInstant : Command
    {
        public override string name { get { return "instant"; } }
        public override string shortcut { get { return ""; } }
        public override string type { get { return "op"; } }
        public override bool consoleUsable { get { return false; } }
        public override Permission defaultRank { get { return Permission.Guest; } }
        public CmdInstant() { }

        public override void Use(Player p, string message)
        {
            if (p.InstantBreak)
            {
                p.InstantBreak = false;
                p.Message(Color.Announcement + "You are no longer in Instant Break mode.");
            }
            else
            {
                p.InstantBreak = true;
                p.Message(Color.Announcement + "You are now in Instant Break mode.");
            }
        }
        public override void Help(Player p)
        {
            p.Message(Color.Aqua + "/instant " + Color.Help + "- Toggles instant mode, where your blocks break instantly.");
        }
    }
}